package com.only4play.portal.cp.message;

import com.only4play.portal.cp.bean.message.AbstractCpMessage;
import com.only4play.portal.cp.bean.message.AbstractCpOutMessage;

/**
 * @author liyuncong
 * @version 1.0
 * @file PortalCpMessageMatcher
 * @brief PortalCpMessageMatcher
 * @details 消息匹配器，用在消息路由的时候
 * @date 2024-06-07
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-06-07               liyuncong          Created
 */
public interface CpMessageMatcher<CpOutMessage extends AbstractCpOutMessage, CpMessage extends AbstractCpMessage> {

    /**
     * 消息是否匹配某种模式
     *
     * @param cpMessage
     * @return
     */
    boolean match(CpMessage cpMessage);
}
